'use strict'

const mongoose = require('mongoose')

const Schema = mongoose.Schema

const Order = mongoose.model('Order', new Schema({
  courseCode: String, // 课程编号
  courseName: String, // 课程名称
  period: Number, // 期数
  customer: {_id: Schema.Types.ObjectId, name: String}, // 学员 -> Customer
  status: {_id: Schema.Types.ObjectId, name: String}, // 订单状态 -> OrderStatus
  manager: [{_id: Schema.Types.ObjectId, name: String}], // 负责人 -> Manager
}))

module.exports = Order